package com.ape.mapsa.produccion.model;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * The persistent class for the maquina database table.
 * 
 */
@Entity
public class Maquina implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = "maq_id")
	private Long id;

	@Column(name = "created_by")
	private String createdBy;

	private String description;

	@Column(name = "is_active")
	private Boolean isActive;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "last_modified")
	private Date lastModified;

	@Column(name = "maq_codigo")
	private String maqCodigo;

	@Column(name = "maq_tipo")
	private Integer maqTipo;

	@OneToMany(mappedBy = "maquina")
	private List<Extrusion> extrusion;

	// bi-directional many-to-one association to Confeccion
	@OneToMany(mappedBy = "maquina")
	private List<Confeccion> confeccions;

	// bi-directional many-to-one association to Impresion
	@OneToMany(mappedBy = "maquina")
	private List<Impresion> impresions;

	public Maquina() {
	}

	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getCreatedBy() {
		return this.createdBy;
	}

	public void setCreatedBy(String createdBy) {
		this.createdBy = createdBy;
	}

	public String getDescription() {
		return this.description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public Boolean getIsActive() {
		return this.isActive;
	}

	public void setIsActive(Boolean isActive) {
		this.isActive = isActive;
	}

	public Date getLastModified() {
		return this.lastModified;
	}

	public void setLastModified(Date lastModified) {
		this.lastModified = lastModified;
	}

	public String getMaqCodigo() {
		return this.maqCodigo;
	}

	public void setMaqCodigo(String maqCodigo) {
		this.maqCodigo = maqCodigo;
	}

	public Integer getMaqTipo() {
		return this.maqTipo;
	}

	public void setMaqTipo(Integer maqTipo) {
		this.maqTipo = maqTipo;
	}

	public List<Extrusion> getExtrusion() {
		return extrusion;
	}

	public void setExtrusion(List<Extrusion> extrusion) {
		this.extrusion = extrusion;
	}

	@Override
	public String toString() {
		return "Maquina [id=" + id + ", createdBy=" + createdBy + ", description=" + description + ", isActive=" + isActive + ", lastModified="
				+ lastModified + ", maqCodigo=" + maqCodigo + ", maqTipo=" + maqTipo + "]";
	}

	public List<Confeccion> getConfeccions() {
		return confeccions;
	}

	public void setConfeccions(List<Confeccion> confeccions) {
		this.confeccions = confeccions;
	}

	public List<Impresion> getImpresions() {
		return impresions;
	}

	public void setImpresions(List<Impresion> impresions) {
		this.impresions = impresions;
	}

}